package com.ciban.smarthome.module.utils;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;

public class ThreadManger {
	private static ThreadManger instance;
	private ScheduledExecutorService scheduledThreadPool = Executors
			.newScheduledThreadPool(3);

	private ThreadManger() {
	}

	public static ThreadManger getInstance() {
		if (instance == null)
			instance = new ThreadManger();

		return instance;
	}

	public void execute(Runnable rT) {
		scheduledThreadPool.execute(rT);
	}
}
